using System;

namespace WindowsPhoneEssentials.Diagnostics
{
    public class DelegateAppender : ITraceAppender
    {
        private readonly Action<string> writeLine;

        public DelegateAppender(Action<string> writeLine)
        {
            this.writeLine = writeLine;
        }

        public void WriteLine(string message)
        {
            writeLine(message);
        }
    }
}